#pragma once

#include <SDL2/SDL.h>
#include "defines.h"

extern "C" {
typedef struct _TTF_Font TTF_Font;
}

struct TextContext;

class Text {
public:
    Text(SDL_Renderer *renderer, const char *msg, TTF_Font *font, SDL_Color color = {255, 255, 255, 255}, int align = 0, int wrapLength = 0);
    virtual ~Text();
    Text(const Text &) = delete;

    void getSize(int *w, int *h);

    void render(const SDL_Rect &rc);
    void render(const SDL_Point &pt);
private:
    TextContext *context;
};
